/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jogo.Entidade;

import jogo.Elemento;

/**
 *
 * @author IVAN
 */
public class AsteroidMovimento extends Elemento {

    private double dx;
    private double dy;

    public AsteroidMovimento(int x, int y, int r,
            double deltax, double deltay) {
        super(x, y, r);
        dx = deltax;
        dy = deltay;

    }

    public void setMovimento(double ndx, double ndy) {
        setDx(ndx);
        setDy(ndy);
    }

    public void mover() {
        getRect().translate((int) getDx(), (int) getDy());
    }

    /**
     * @return the dx
     */
    public double getDx() {
        return dx;
    }

    /**
     * @param dx the dx to set
     */
    public void setDx(double dx) {
        this.dx = dx;
    }

    /**
     * @return the dy
     */
    public double getDy() {
        return dy;
    }

    /**
     * @param dy the dy to set
     */
    public void setDy(double dy) {
        this.dy = dy;
    }
}
